# Paimon Launcher

Alternative launcher for GI, installs and updates the game, handles patches automatically. It's developed to run under Linux only.

Download manager Aria2c is used for improved download speed.


![Updating the game](https://notabug.org/loentar/paimon-launcher/raw/master/screenshots/updating.png)


### Usage

At start the launcher tries to detect game installation by looking in few common directories. If you have game installed but launcher didn't detected its installation path, click "Browse..." and choose the "Game" directory (where UnityPlayer.dll is located).

If you don't have game installed, launcher will offer to install it to default directory. Click "Browse..." if you wish to install to the different directory.


### Installation

This launcher is built on Ubuntu 16.04 and tested on Ubuntu 16.04, 20.04, Fedora 34, Arch Linux. 

**For Ubuntu 22.04 or newer version you must have `libssl1.1` installed. Else it may lead to "Failed to check version info..." error. **

Other distributions should be supported as well. If you face a bug feel free to [file an issue](https://notabug.org/loentar/paimon-launcher/issues/new).



#### One-line installer with update support

In this way of installation the self update via "Settings -> Check for updates..." is supported.

To download and install launcher with just one line:
```
wget -qO- https://notabug.org/loentar/paimon-launcher/raw/master/scripts/selfupdate | bash -s - install
```

Or if you prefer `curl` instead:
```
curl https://notabug.org/loentar/paimon-launcher/raw/master/scripts/selfupdate | bash -s - install
```

After installation run launcher with `Paimon_Launcher.AppImage`.

If it doesn't start, try running it by full path: `$HOME/.local/bin/Paimon_Launcher.AppImage` .


#### Or just bare AppImage

Self-update is not supported if you downloaded and started AppImage. You still can check for updates and get redirected to download page from "Settings -> Check for updates...".

This app is distributed via AppImage.

0. Download the latest archive from [Releases](https://notabug.org/loentar/paimon-launcher/releases)
0. Open Terminal
0. `cd ~/Downloads`
0. `chmod +x Paimon_Launcher-[VERSION]-x86_64.AppImage`
0. `./Paimon_Launcher-[VERSION]-x86_64.AppImage`

or read [this article](https://codeburst.io/how-to-install-and-run-appimage-on-linux-systems-f031ec6a85ce) to learn how to do the same from GUI.


### Build from sources

If provided AppImage doesn't work for some reason you may build launcher from source code:

0. Make sure build dependencies are installed. For deb systems run: `sudo apt install build-essential git`
0. Clone this project using: `git clone https://notabug.org/loentar/paimon-launcher.git`
0. Download and start https://www.qt.io/download-thank-you .
0. You need to `chmod +x qt-unified-linux-x64-*-online.run` to start it.
0. Register/sign in with free Qt account.
0. Install version 5.15.2 of Qt only desktop (Desktop gcc 64-bit 5.15.2-0-....), you don't need any other packages to build this project.
0. After Qt installation is finished, start Qt Creator and open `paimon-launcher.pro` from cloned directory
0. Set up everything by default (Desktop 5.15.2)
0. Choose target Release (Ctrl+T, Release) else updater will not be able to update Web version
0. Build and run the project (Ctrl+R or the green triangle icon to the left bottom side)


### Command line option configuration

You can configure launcher to use Lutris/Proton instead of default wine installation also to control launch options and environment. All these settings are stored in `$HOME/.local/share/paimon-launcher/wineconfig.sh`. To open it in default editor choose "Edit wineconfig.sh" from settings menu.


### Settings menu description

 - Change Game location... - You can switch between multiple installations of the game or select an empty directory for a new installation
 - Hide background - Makes background flat gray
 - Clear log - Makes log box empty
 - Speedup downloads - Enables aria2c option "-x4" to download a single file in 4 streams, configurable from settings file, option `multiConnectionsValue`
 - Limit download speed - Enables aria2c option "--max-download-limit=1M" to reduce bps, configurable from settings file, option `limitDownloadValue`
 - Re-apply Wine patch - Reverts patch and applies it again. To revert-only press "No".
 - Kill wineserver - Kills wine server, may solve some problems with game startup/restart. Should kill any started wine apps as well.
 - Edit wineconfig.sh - Opens wine settings file, see "Command line option configuration"
 - Run integrity check... - Verifies are game file present and not corrupted.
 - Check for Launcher updates at startup - Check for a new version of launcher when it starts.
 - Check for Launcher updates now... - Checks if a new version of launcher is available and offer to update/download.
 - About... - Opens "About" screen



### TODO

 - Show progress+status icon like gparted does.
 - Detect Wine, Lutris, Proton versions, make it possible to select specific version from settings.
